package com.atguigu.guli.service.edu.mapper;

import com.atguigu.guli.service.edu.entity.Chapter;
import com.atguigu.guli.service.edu.entity.Video;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author atguigu
 * @since 2021-06-24
 */
public interface ChapterMapper extends BaseMapper<Chapter> {

    // 查询章下有没有小节
    List<Video> getVideo(String chapterId);

    // 查询所有的章和小节
    List<Chapter> getChaptersAndVideoS(@Param("courseId") String courseId);
}
